/**
 * Copyright ©2016-2022 tianyu education Corporation, All Rights Reserved
 * http://www.whty.com.cn/
 */
package profile.hujia.redis.service;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import profile.hujia.redis.manager.Cache;

/**
 * class info
 *
 * @author hujia
 * @date 2019-12-24 11:24
 */
@Service
@Slf4j
public class JedisClusterCacheTest implements RedisTest {

    @Autowired
    @Qualifier("jedisClusterCache")
    private Cache cache;

    @Override
    public void put(String key, String value) {
        cache.put(key.getBytes(), value.getBytes());
    }

    @Override
    public String get(String key) {
        return new String(cache.get(key.getBytes()));
    }
}